from typing import *
from leetcode.editor.common.node import *


# leetcode submit region begin(Prohibit modification and deletion)
class Solution:
    def removeElement(self, nums: List[int], val: int) -> int:
        slow,quick = 0,0
        while quick < len(nums):
            if nums[quick] != val:
                nums[slow] = nums[quick]
                slow +=1
            quick+=1
        return slow
# leetcode submit region end(Prohibit modification and deletion)


if __name__ == '__main__':
    solution = Solution()
    # your test code here